using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading;
using System.Windows.Forms;

namespace RibbonEndUserDesignerDemo {
	static class Program {

        static Splash _splash = null;
        static Thread ms_oThread = null;
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() {
			DevExpress.UserSkins.OfficeSkins.Register();
			DevExpress.UserSkins.BonusSkins.Register();
			DevExpress.Skins.SkinManager.EnableFormSkins();
			Application.EnableVisualStyles();
            
			Application.SetCompatibleTextRenderingDefault(false);
		    ms_oThread = new Thread(ShowForm);
            ms_oThread.IsBackground = true;
            ms_oThread.SetApartmentState(ApartmentState.STA); 
            ms_oThread.Start();
		    MainForm _loc = new MainForm();
            _loc.Activated +=_loc_Activated ;
			Application.Run(_loc);

		}
   //     [DescriptionAttribute(""), Bindable(BindableSupport.Yes)]
        //delegate void _loc_ActivatedInvoked(object sender, EventArgs e);
        static void _loc_Activated(object sender, EventArgs e)
        {
            MainForm _sender = (MainForm) sender;
           
                ((MainForm)sender).Shown -= _loc_Activated;
                ((MainForm) sender).TopMost = true;
                if (_splash != null) _splash.CloseMe();
              ((MainForm) sender).TopMost = false;
         }

	    static public void ShowForm()
        {
            _splash = new Splash();
            Application.Run(_splash);
        }
        // A s

      
	}
}
